// import { user } from "./redux/user.redux"

export function getRedirectPath({type, avatar}) {
    // 根据用户信息 返回跳转地址
    // user.type /boss /genius
    // user.avatar /bossinfo /geniusinfo
    let url = ''
    if (!avatar) {
        url = type === 'boss' ? '/boss' : '/genius'
        url += 'info'
    } else {
        url = type === 'boss' ? '/genius' : '/boss'
    }
    return url
}

export function getChatId(userId, targetId) {
    return [userId, targetId].sort().join('_')
}